import { createApp } from 'vue'
// import './style.css'
import App from './App.vue'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import VueAxios from 'vue-axios'
import axios from 'axios'
import { createRouter, createWebHashHistory} from 'vue-router'
import login from './components/login.vue'
import index from './components/index.vue'
import research from './components/research.vue'
import project from './components/project.vue'
import projectDetails from './components/projectDetails.vue'
import addProject from './components/addProject.vue'
// import demo2 from './components/demo2.vue'

const router = createRouter({
	history: createWebHashHistory(),
	routes: [
		{path: '/',redirect:'/login'},
		{path: '/login',component: login},
		{path: '/index' , component: index , name: 'index' },
		{path: '/research',component: research,name:'research',
			children: [
				{path: 'project' , component: project , name: 'project' },
				{path: 'projectDetails',component: projectDetails,name: 'projectDetails'},
				{path: 'addProject',component: addProject,name:'addProject'}

				]
		}
		// {path: '/demo2',component: demo2}
	]
})


var app=createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
	app.component(key, component)
  }
app.use(ElementPlus)
app.use( VueAxios , axios )
app.use( router )
app.mount('#app')
